<!--/*--><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link id="mastercss" rel="stylesheet" href="images/style.css" type="text/css" media="screen"/>
</head>
<body><!--*/-->
<!--{&header,${title!},内容管理&nbsp;&raquo;&nbsp;模型管理&nbsp;&raquo;&nbsp;字段管理}-->
<!--{!#system,common}-->
<!--{&cms/field_include.php}-->
<div id="newslisttab">
    <ul>
        <li style="float:right"><a href="#{cms/model}#">管理模型</a></li>
        <li style="float:right"><a href="#{cms/actionmodel/3/${modelid}}#">预览模型</a></li>
        <li style="float:right" class="active"><a>字段管理</a></li>
        <li style="float:right"><a href="#{cms/addfield/${modelid}}#">添加字段</a></li>
    </ul>
</div>
<form method="post" action="site.html#{/system/resource/update}#" enctype="multipart/form-data">
    <table cellspacing='0' cellpadding='0' width='100%' class='listtable'>
        <tr>
            <th width="50">ID</th>
            <th>字段名</th>
            <th>别名</th>
            <th width="120">类型</th>
            <th width="120">管理操作</th>
        </tr>
        <!--{loop $data $v}-->
        <tr>
            <td>${v[fieldid]}</td>
            <td>${v[field]}</td>
            <td>${v[name]}</td>
            <td>{=$fields[$v['formtype']]}</td>
            <td>
                <!--{if $v['iscore']}-->
                    <span style="color:#CCCCCC">修改 | 禁用 | 删除</span>
                <!--{else}-->
                    <a href="#{/cms/editfield/${v[modelid]}/${v[fieldid]}}#">修改</a> |
                    <a href="#{/cms/actionfield/1/${v[modelid]}/${v[fieldid]}}#">{=($v['disabled']==1 ? '<span class="sred">启用</span>' : '禁用')}</a> |
                    <!--{if $v['issystem']}-->
                    <span style="color:#cccccc">删除</span>
                    <!--{else}-->
                    <a href="javascript:confirmurl('#{/cms/actionfield/2/${v[modelid]}/${v[fieldid]}}#','确认要删除‘${v[name]}’字段吗？');">删除</a>
                    <!--{/if}-->
                <!--{/if}-->
                </td>
        </tr>
        <!--{/loop}-->
        <script type="">
            function confirmurl(url,message) {
                if(confirm(message)) window.location.href = url;
            }
        </script>
    </table>
</form>
<!--{&footer}-->
<!--/*-->
</body>
</html><!--*/-->